<template>
  <div class="no-auth-container">
    <a-result status="403" title="403" sub-title="抱歉，您无权访问此页面">
      <template #extra>
        <a-space>
          <a-button type="primary" @click="backToHome">返回首页</a-button>
          <a-button @click="goBack">返回上一页</a-button>
        </a-space>
      </template>
    </a-result>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();

const backToHome = () => {
  router.push("/");
};

const goBack = () => {
  router.go(-1);
};
</script>

<style scoped>
.no-auth-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
</style>
